﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="XemDonHang.aspx.cs" Inherits="XemDonHang" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  <div class="art-post">
        <div class="art-post-tl">
        </div>
        <div class="art-post-tr">
        </div>
        <div class="art-post-bl">
        </div>
        <div class="art-post-br">
        </div>
        <div class="art-post-tc">
        </div>
        <div class="art-post-bc">
        </div>
        <div class="art-post-cl">
        </div>
        <div class="art-post-cr">
        </div>
        <div class="art-post-cc">
        </div>
        <div class="art-post-body">
            <div class="art-post-inner art-article">
                <h2 class="art-postheader">
                    Thông tin đơn hàng</h2>
                <div class="art-postcontent">
                 <asp:ListView ID="ListView2" runat="server">
        <LayoutTemplate>
            
                        <table id="itemPlaceholderContainer" runat="server" border="1">
                            <tr id="itemPlaceholder" runat="server">
                            </tr>
                        </table>
                    
        </LayoutTemplate>
        <InsertItemTemplate>
            <span style="">IDUser:
                <asp:TextBox ID="IDUserTextBox" runat="server" Text='<%# Bind("IDUser") %>' />
                <br />
                ThoiDiemLapDDH:
                <asp:TextBox ID="ThoiDiemLapDDHTextBox" runat="server" Text='<%# Bind("ThoiDiemLapDDH") %>' />
                <br />
                TongTien:
                <asp:TextBox ID="TongTienTextBox" runat="server" Text='<%# Bind("TongTien") %>' />
                <br />
                SoDienThoaiNguoiNhan:
                <asp:TextBox ID="SoDienThoaiNguoiNhanTextBox" runat="server" Text='<%# Bind("SoDienThoaiNguoiNhan") %>' />
                <br />
                DiaChiGiaoHang:
                <asp:TextBox ID="DiaChiGiaoHangTextBox" runat="server" Text='<%# Bind("DiaChiGiaoHang") %>' />
                <br />
                EmailNguoiNhan:
                <asp:TextBox ID="EmailNguoiNhanTextBox" runat="server" Text='<%# Bind("EmailNguoiNhan") %>' />
                <br />
                TrangThai:
                <asp:TextBox ID="TrangThaiTextBox" runat="server" Text='<%# Bind("TrangThai") %>' />
                <br />
                code:
                <asp:TextBox ID="codeTextBox" runat="server" Text='<%# Bind("code") %>' />
                <br />
                <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                <br />
                <br />
            </span>
        </InsertItemTemplate>
        <SelectedItemTemplate>
            <span style="">IDUser:
                <asp:Label ID="IDUserLabel" runat="server" Text='<%# Eval("IDUser") %>' />
                <br />
                ThoiDiemLapDDH:
                <asp:Label ID="ThoiDiemLapDDHLabel" runat="server" Text='<%# Eval("ThoiDiemLapDDH") %>' />
                <br />
                TongTien:
                <asp:Label ID="TongTienLabel" runat="server" Text='<%# Eval("TongTien") %>' />
                <br />
                SoDienThoaiNguoiNhan:
                <asp:Label ID="SoDienThoaiNguoiNhanLabel" runat="server" Text='<%# Eval("SoDienThoaiNguoiNhan") %>' />
                <br />
                DiaChiGiaoHang:
                <asp:Label ID="DiaChiGiaoHangLabel" runat="server" Text='<%# Eval("DiaChiGiaoHang") %>' />
                <br />
                EmailNguoiNhan:
                <asp:Label ID="EmailNguoiNhanLabel" runat="server" Text='<%# Eval("EmailNguoiNhan") %>' />
                <br />
                TrangThai:
                <asp:Label ID="TrangThaiLabel" runat="server" Text='<%# Eval("TrangThai") %>' />
                <br />
                code:
                <asp:Label ID="codeLabel" runat="server" Text='<%# Eval("code") %>' />
                <br />
                <br />
            </span>
        </SelectedItemTemplate>
        <EmptyDataTemplate>
            <span>No data was returned.</span>
        </EmptyDataTemplate>
        <EditItemTemplate>
            <span style="">IDUser:
                <asp:TextBox ID="IDUserTextBox" runat="server" Text='<%# Bind("IDUser") %>' />
                <br />
                ThoiDiemLapDDH:
                <asp:TextBox ID="ThoiDiemLapDDHTextBox" runat="server" Text='<%# Bind("ThoiDiemLapDDH") %>' />
                <br />
                TongTien:
                <asp:TextBox ID="TongTienTextBox" runat="server" Text='<%# Bind("TongTien") %>' />
                <br />
                SoDienThoaiNguoiNhan:
                <asp:TextBox ID="SoDienThoaiNguoiNhanTextBox" runat="server" Text='<%# Bind("SoDienThoaiNguoiNhan") %>' />
                <br />
                DiaChiGiaoHang:
                <asp:TextBox ID="DiaChiGiaoHangTextBox" runat="server" Text='<%# Bind("DiaChiGiaoHang") %>' />
                <br />
                EmailNguoiNhan:
                <asp:TextBox ID="EmailNguoiNhanTextBox" runat="server" Text='<%# Bind("EmailNguoiNhan") %>' />
                <br />
                TrangThai:
                <asp:TextBox ID="TrangThaiTextBox" runat="server" Text='<%# Bind("TrangThai") %>' />
                <br />
                code:
                <asp:TextBox ID="codeTextBox" runat="server" Text='<%# Bind("code") %>' />
                <br />
                <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                <br />
                <br />
            </span>
        </EditItemTemplate>
        <ItemTemplate>
            <table class="ct_nguoi_nhan">
                <tr>
                    <td>
                        Code:
                        <asp:Label ID="codeLabel" runat="server" Text='<%# Eval("code") %>' />
                    </td>
                    <td>
                        Tên người dùng:
                        <asp:Label ID="IDUserLabel" runat="server" Text='<%# Eval("IDUser") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        Thời điểm đặt hàng:
                        <asp:Label ID="ThoiDiemLapDDHLabel" runat="server" Text='<%# Eval("ThoiDiemLapDDH") %>' />
                    </td>
                    <td>
                        Tổng tiền:
                        <asp:Label ID="TongTienLabel" runat="server" Text='<%# Eval("TongTien").ToString() %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        Số điện thoại người nhận:
                        <asp:Label ID="SoDienThoaiNguoiNhanLabel" runat="server" Text='<%# Eval("SoDienThoaiNguoiNhan") %>' />
                    </td>
                    <td>
                        Địa chỉ giao hàng:
                        <asp:Label ID="DiaChiGiaoHangLabel" runat="server" Text='<%# Eval("DiaChiGiaoHang") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        Email người nhận:
                        <asp:Label ID="EmailNguoiNhanLabel" runat="server" Text='<%# Eval("EmailNguoiNhan") %>' />
                    </td>
                    <td>
                        Trạng thái:
                        <asp:Label ID="TrangThaiLabel" runat="server" Text='<%# format_text(Eval("TrangThai").ToString()) %>' />
                    </td>
                </tr>
                <tr>
            </table>
        </ItemTemplate>
    </asp:ListView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringMembership %>"
        SelectCommand="SELECT [IDUser], [ThoiDiemLapDDH], [TongTien], [SoDienThoaiNguoiNhan], [DiaChiGiaoHang], [EmailNguoiNhan], [TrangThai], [code] FROM [DonDatHang]">
    </asp:SqlDataSource>
<h2 class="art-postheader">
                    Chi tiết đơn đặt hàng</h2>
    <asp:ListView ID="ListView1" runat="server">
        <LayoutTemplate>

                        <table id="itemPlaceholderContainer" runat="server" border="1" class="ct_don_hang">
                            <tr id="Tr2" runat="server">
                                <th id="Th1" runat="server">
                                    Mã
                                </th>
                                <th id="Th2" runat="server">
                                    Tài liệu
                                </th>
                                <th id="Th3" runat="server">
                                    Số lượng
                                </th>
                                <th id="Th4" runat="server">
                                    Đơn giá
                                </th>
                            </tr>
                            <tr id="itemPlaceholder" runat="server">
                            </tr>
                        </table>

        </LayoutTemplate>
        <InsertItemTemplate>
            <tr style="">
                <td>
                    <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                </td>
                <td>
                    <asp:TextBox ID="IDDonDatHangTextBox" runat="server" Text='<%# Bind("IDDonDatHang") %>' />
                </td>
                <td>
                    <asp:TextBox ID="IDTaiLieuTextBox" runat="server" Text='<%# Bind("IDTaiLieu") %>' />
                </td>
                <td>
                    <asp:TextBox ID="SoLuongTextBox" runat="server" Text='<%# Bind("SoLuong") %>' />
                </td>
                <td>
                    <asp:TextBox ID="DonGiaTextBox" runat="server" Text='<%# Bind("DonGia") %>' />
                </td>
            </tr>
        </InsertItemTemplate>
        <SelectedItemTemplate>
            <tr style="background-color: #E2DED6; font-weight: bold; color: #333333;">
                <td>
                    <asp:Label ID="IDDonDatHangLabel" runat="server" Text='<%# Eval("IDDonDatHang") %>' />
                </td>
                <td>
                    <asp:Label ID="IDTaiLieuLabel" runat="server" Text='<%# Eval("IDTaiLieu") %>' />
                </td>
                <td>
                    <asp:Label ID="SoLuongLabel" runat="server" Text='<%# Eval("SoLuong") %>' />
                </td>
                <td>
                    <asp:Label ID="DonGiaLabel" runat="server" Text='<%# Eval("DonGia") %>' />
                </td>
            </tr>
        </SelectedItemTemplate>
        <EmptyDataTemplate>
            <table id="Table2" runat="server" style="background-color: #FFFFFF; border-collapse: collapse;
                border-color: #999999; border-style: none; border-width: 1px;">
                <tr>
                    <td>
                        No data was returned.
                    </td>
                </tr>
            </table>
        </EmptyDataTemplate>
        <EditItemTemplate>
            <tr style="background-color: #999999;">
                <td>
                    <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                </td>
                <td>
                    <asp:TextBox ID="IDDonDatHangTextBox" runat="server" Text='<%# Bind("IDDonDatHang") %>' />
                </td>
                <td>
                    <asp:TextBox ID="IDTaiLieuTextBox" runat="server" Text='<%# Bind("IDTaiLieu") %>' />
                </td>
                <td>
                    <asp:TextBox ID="SoLuongTextBox" runat="server" Text='<%# Bind("SoLuong") %>' />
                </td>
                <td>
                    <asp:TextBox ID="DonGiaTextBox" runat="server" Text='<%# Bind("DonGia") %>' />
                </td>
            </tr>
        </EditItemTemplate>
        <ItemTemplate>
            <tr>
                <td>
                    <asp:Label ID="IDDonDatHangLabel" runat="server" Text='<%# Eval("IDChiTietDDH") %>' />
                </td>
                <td>
                    <asp:Label ID="IDTaiLieuLabel" runat="server" Text='<%# Eval("IDTaiLieu") %>' />
                </td>
                <td>
                    <asp:Label ID="SoLuongLabel" runat="server" Text='<%# Eval("SoLuong") %>' />
                </td>
                <td>
                    <asp:Label ID="DonGiaLabel" runat="server" Text='<%# Eval("DonGia") %>' />
                </td>
            </tr>
        </ItemTemplate>
    </asp:ListView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringMembership %>"
        SelectCommand="SELECT [IDChiTietDDH], ( select TenTL FROM [TaiLieu] where [TaiLieu].IDTaiLieu = [ChiTietDDH].IDTaiLieu ) as [IDTaiLieu], [SoLuong], [DonGia] FROM [ChiTietDDH] ">
    </asp:SqlDataSource>
                    <div class="cleared">
                    </div>
                </div>
                <div class="cleared">
                </div>
            </div>
            <div class="cleared">
            </div>
        </div>
    </div>
      <!--  Thông tin đặt hàng</h3>
    <asp:Label ID="RS" runat="server" Visible="false" Text="Label"></asp:Label>
  
    -->
</asp:Content>

